package com.cndw.kungfu.model.battle;

import java.util.Comparator;

import com.cndw.kungfu.ext.NumberProcesser;

public class FighterComparator implements Comparator<Fighter> {

	@Override
	public int compare(Fighter arg0, Fighter arg1) {
		
		if (arg0.getSpeed() > arg1.getSpeed()) {
			return -1;
		}else if (arg0.getSpeed() < arg1.getSpeed() ) {
			return 1;
		}else {
			if (NumberProcesser.isWinning(50)) {
				return 1;
			}else {
				return -1;
			}
		}
		
	}


	
	
}
